<?php
/* explain:		logout system
 * Project:     marsems
 * File:        logon.php
 *
 * @ link 		http://www.marsems.com/admin/
 * @ Email		ldmmyx@hotmail.com
 * @ copyright 	2005  Ling Deming	
 * @ author 	ivan  Ling Deming
 * @ version 2.0
 */

/*----- import modules -----*/
//include_once ("../configure/config.inc.php");		//----- global var
include_once ("./configure/admin.config.inc.php");//-- local var
include_once ("Logs.php");						//----- logs 
include_once ("Session.php");			//----- Session

/*----- instance -----*/
$ins_session = new Session();				//----- session
$ins_log	 = new Logs(0);					//----- logs

/*----- delete session -----*/
if($ins_session->exist()){
	$mixData = $ins_log->arrGetLoginLog($ins_session->getLoginID());
	if(is_array($mixData)){
		$ins_log->escLogout($ins_session->getLoginID(), date('Y-m-d H:i:s'), $mixData['ip']);
	}
	$ins_session->destroy();
}
header("Location: ./");
exit();
?>